package com.flyduck.system.dao;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.flyduck.system.entity.SysUserEntity;
import com.flyduck.system.mapper.SysUserMapper;
import org.springframework.stereotype.Repository;

/**
 * @program: flyduck-platform2
 * @description:
 * @author: flyduck
 * @create: 2021-04-23 14:28
 **/
@Repository
public class SysUserDao extends ServiceImpl<SysUserMapper, SysUserEntity> {

    public SysUserEntity getUserByUserName(String userName) {
        return this.baseMapper.selectOne(
                new QueryWrapper<SysUserEntity>()
                        .eq("user_name", userName)
        );
    }

}
